package org.hiucung.baiyun_health_report.controller;

import org.hiucung.baiyun_health_report.api.BaiyunHealthReportApi;
import org.hiucung.baiyun_health_report.entity.Result;
import org.hiucung.baiyun_health_report.service.SubmitHealthReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.io.IOException;

/**
 * @author its-kicc
 * @desc 健康上报 Controller
 * @date 2021/12/5
 */
@Component
public class SubmitHealthReportController {

    @Autowired
    private SubmitHealthReportService mSubmitHealthReportService;

    //    每5秒执行一次 */5 * * * * ?
    //    每天23点执行一次：0 0 23 * * ?
    //    每天凌晨1点执行一次：0 0 1 * * ?

    //定时循环执行此方法 每天早上7点36分执行一次
    @Scheduled(cron = "0 36 7 * * ?")
    public void SubmitHealthReport() {
        mSubmitHealthReportService.autoSubmitHealthReport();
    }

}
